//
//  DPSingleTon.h
//  DrinkingPlan
//
//  Created by 张德广 on 2019/3/15.
//  Copyright © 2019 Drinking Plan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface DPSingleTon : NSObject

/**
 *  getCurrentTime
 */
+ (NSString *)getCurrentTime;

/**
 *  getCurrentDetailTime
 */
+ (NSString *)getCurrentDetailTime;

/**
 *  getCurrentHour
 */
+ (NSString *)getCurrentHour;

/**
 *  获取某天是星期几
 */
+ (NSString *)weekdayStringFromDate:(NSDate *)inputDate;

/**
 *  Compare Two Date
 */
+ (int)compareOneDay:(NSDate *)oneDay withAnotherDay:(NSDate *)anotherDay;

/**
 *  调整行间距
 */
+ (void)adjustLineSpacingOfLabel:(UILabel *)label to:(CGFloat)lineSpacing;

/** 保存数据的路径 */
+ (NSString *)createFullPathForDocument:(NSString *)fullPath;

/** 从路径中获取保存model数组 */
+ (NSMutableArray *)readModelArrayForDocument:(NSString *)path;

/** 保存数据到沙盒 */
+ (void)saveModelDictionaryInDocument:(NSMutableArray *)array andPath:(NSString *)path;

// 判断NSDictionary是否为空
+ (BOOL)isBlankDictionary:(NSDictionary *)dict;

// 字符串转换为NSDate
+ (NSDate *)dateFromString:(NSString *)string withFormat:(NSString *)format;

+ (NSString *)stringWithFormat:(NSString *)format withDate:(NSDate *)date;

@end

NS_ASSUME_NONNULL_END
